Deploying Kanzi applications to Android

Before you can build and deploy Kanzi applications for Android, you need to set up the Kanzi build environment for Android and install on your computer the USB device drivers for your Android device. See Installing Kanzi build environment for Android.

Building and deploying Kanzi applications from Kanzi Studio

To build and deploy your Kanzi application to Android from Kanzi Studio:

  1. Connect your Android device to your computer.
  2. In Kanzi Studio open your Kanzi project and select File > Build Android Package.
    Kanzi Studio builds the application source code, creates APK package, and installs the package to your Android device.

Building Kanzi applications with SCons

To build your Kanzi application with Scons use the scons command:

scons <ES1|GL21> <debug|release|profile> <ProjectName>

Run the SCons build command in the configuration directory of the platform for which you want to build the Kanzi application. For example, to build your Kanzi application for Android, run the SCons build command in the <ProjectName>/Application/configs/platforms/android directory.

SConstruct file contains information about Kanzi Engine location and runs the following config files:

Project configuration parameters include:

Building and deploying Kanzi applications for Android with SCons

To build and deploy your Kanzi application to Android using SCons:

  1. Connect your Android device to your computer.
  2. Launch the Windows command line and go to the Application/configs/platforms/android directory of your project.
    For example, if your project is called MyProject, go to the MyProject/Application/configs/platforms/android directory.
  3. Build your Kanzi application with Scons by running scons es2 debug <KanziProjectName>.
    Scons builds the application source code and creates the APK package in the Application/output directory.
    For example, if your project is called MyProject, run the following command:
    scons es2 debug MyProject

    Scons creates the APK package with the same name as the project name in the MyProject/Application/output directory.
  4. Install the application on your Android device by running adb install in the Application/output directory.
    ADB installs the package to your Android device.
    For example, if your project is called MyProject and is stored in the KanziWorkspace, run the following command:
    adb install C:\KanziWorkspace\Projects\MyProject\Application\output\MyProject-debug.apk

Troubleshooting

See also

Installing Kanzi build environment for Android

Creating your first application

Android OEM USB Drivers